```{ojs}
//| echo: false

// Auto-animation logic
{
  if (isPlaying) {
    const years = years_list;
    let currentIndex = years.indexOf(selectedYear);
    
    const interval = setInterval(() => {
      currentIndex = (currentIndex + 1) % years.length;
      selectedYear = years[currentIndex];
    }, animationSpeed);
    
    // Clean up interval when isPlaying changes
    invalidation.then(() => clearInterval(interval));
  }
}

// Animation control info
animationControls = html`
  <div style="background: #f8f9fa; padding: 15px; border-radius: 8px; margin-top: 15px;">
    <h5 style="margin-top: 0;">🎬 Animation Guide</h5>
    <ul style="margin: 0; padding-left: 20px; font-size: 0.9rem;">
      <li><strong>Auto-play:</strong> Toggle to start/stop animation</li>
      <li><strong>Speed:</strong> Adjust animation speed (100ms = fast, 2000ms = slow)</li>
      <li><strong>Year Slider:</strong> Manually control which year is displayed</li>
      <li><strong>Map Interaction:</strong> Click countries on the map above</li>
    </ul>
    <p style="margin: 10px 0 0 0; font-size: 0.8rem; color: #666;">
      💡 <em>Watch how measles patterns change over time across different regions!</em>
    </p>
  </div>
`
```
OJS Syntax Error (line 411, column 7)Assignment to constant variable selectedYear